Skip to content

Add UnitTestDeterministicId test class to WebUI test suite#8

Merged
ReneSchwarzer merged 2 commits intodevelopfrom
copilot/update-webexpress-webui-documentation
Apr 5, 2026
Merged

Add UnitTestDeterministicId test class to WebUI test suite#8
ReneSchwarzer merged 2 commits intodevelopfrom
copilot/update-webexpress-webui-documentation

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 5, 2026

PR #6 described adding a unit test class for deterministic identifiers, but no such class existed in WebExpress.WebUI.Test. The three Copilot review comments marked outdated were already resolved in prior commits; the fourth (null handling in UnitTestControlListItemButton) was already correctly implemented via the ternary guard.

Changes

  • New: src/WebExpress.WebUI.Test/WebHtml/UnitTestDeterministicId.cs — adds a dedicated test class for DeterministicId.Create() under a new WebHtml/ folder, covering:
    • Same callsite → different IDs (call stack context differs by IL offset)
    • Different context values → different IDs
    • Different callsites (distinct lambdas) → different IDs
[Fact]
public void CreateDifferentCallsites()
{
    var callsiteA = new Func<string>(() => DeterministicId.Create());
    var callsiteB = new Func<string>(() => DeterministicId.Create());

    Assert.NotEqual(callsiteA(), callsiteB());
}

The structure and naming mirrors the equivalent test class in WebExpress.WebCore.Test.

Copilot AI changed the title [WIP] Update WebExpress.WebUI documentation Add UnitTestDeterministicId test class to WebUI test suite Apr 5, 2026
Copilot AI requested a review from ReneSchwarzer April 5, 2026 08:56
@ReneSchwarzer ReneSchwarzer marked this pull request as ready for review April 5, 2026 08:57
@ReneSchwarzer ReneSchwarzer merged commit 97a5685 into develop Apr 5, 2026
@ReneSchwarzer ReneSchwarzer deleted the copilot/update-webexpress-webui-documentation branch April 5, 2026 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants